<?php
/**
 * Introduction: 手机验证码  captcha
 */

namespace Common\Model;


use Think\Model;

class CaptchaModel extends Model
{
    //定义数据库连接信息
    protected $connection;

    //定义表名
    protected $tableName = 'captcha';

    /**
     * 初始化
     */
    public function _initialize()
    {

        $this->connection = C('Databaese');

    }

    /**
     * 查询单条数据
     */
    public function getOne($mobile,$code){
        return $this->where("mobile=$mobile and captcha=$code")->find();
    }

}